%% about
% this file generates Table 5: Labor markets predict bond excess returns

clc
clear all
load run1a_baseline_sr.mat

%% print model implied values

% A. Labor Market Tightness
fprintf('\nhpxr (nom) regressed on tightness\n')
for n = 2:5

    b = stats.betas_hpxr_theta_nom(n-1); % assumes hpxr is in percentage terms
    a = 100*stats.bond_risk_prem_nom_uncond(n-1) - b*stats.tightness_mean; % 
    R2 = (b^2*stats.tightness_std^2)/((100*stats.bond_exret_nom_uncond_vol(n-1))^2);

    fprintf('%g year nom bond, tightness: a=%4.2f, b=%4.2f, R2=%4.3f.\n',...
        n,a,b,R2);

end

% B. Job finding rate
fprintf('\nhpxr (nom) regressed on f\n')
for n = 2:5

    b = stats.betas_hpxr_fprob_nom(n-1); % assumes hpxr is in percentage terms
    a = 100*stats.bond_risk_prem_nom_uncond(n-1) - b*stats.f_mean; % 
    R2 = (b^2*stats.f_std^2)/((100*stats.bond_exret_nom_uncond_vol(n-1))^2);

    fprintf('%g year nom bond, fprob: a=%4.2f, b=%4.2f, R2=%4.3f.\n',...
        n,a,b,R2);

end